

import 'package:baselib/utils/log_util.dart';
import 'package:baselib/utils/navigator_util.dart';
import 'package:baselib/utils/toast_util.dart';
import 'package:framelib/base/base_view_model.dart';
import 'package:framelib/config/api_config.dart';
import 'package:framelib/net/baseentity.dart';
import 'package:framelib/utils/nim_sdk_util.dart';
import 'package:framelib/utils/string_util.dart';
import 'package:get/state_manager.dart';
import 'package:get/get.dart';
import 'package:module_business/module_comm/model/user_params_model.dart';
import 'package:module_business/module_index/model/index_room_item_entity.dart';
import 'package:module_business/module_index/model/voice_person_entity.dart';
import 'package:module_business/module_index/service/module_index_service.dart';
import 'package:nim_core/nim_core.dart';

class EditSignatureViewModel extends BaseViewModel<ModuleIndexService>{

  ModuleIndexService moduleIndexService;
  String signature = '';

  @override
  ModuleIndexService createService() =>moduleIndexService = ModuleIndexService();
  @override
  void onInit() {
    super.onInit();
    Map<String,dynamic> arguments = Get.arguments??{};
    signature =  arguments['signature'];
  }
  @override
  void onClose() {
    super.onClose();
  }

  save() async{
    if((signature??'').isEmpty){
      ToastUtil.toast('${StringUtil.instance.Please_enter} ${StringUtil.instance.Signature}');
      return;
    }
    NavigatorUtil.goBack(result: {'result':'ok','signature':signature});
  }

  inputChange(value) {
    signature = value;
  }
}
